package com.lecture.java8.geekbang.demo02;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;

public class MessageQueueLogger extends Logger {

    private List<String> messageList;

    public MessageQueueLogger(String name,boolean enabled,Level minPermittedLevel,String filePath) {
        super(name, enabled, minPermittedLevel);
        messageList = new ArrayList<>();
    }

    @Override
    protected void doLog(Level level, String message) throws IOException {
        messageList.add(message);
    }
}
